import 'package:basic_common/app_theme.dart';
import 'package:basic_common/common_exports.dart';
import 'package:basic_services/serviceDetail/service_detail_controller.dart';
import 'package:basic_widgets/button_widget.dart';
/* 
 * @description: 添加血压数据
 * @author: Jane 
 * @date: 2023-09-20 15:04:29
 */
class AddPressureDialog extends GetView<ServerDetailController> {
  List<Widget> cellEdits;
  AddPressureDialog({required this.cellEdits});
  @override
  Widget build(BuildContext context) {
    return SimpleDialog(
      title: Align(
        alignment: Alignment.topCenter,
        child: Text("添加血压"),
      ),
      children: [
        //这边自己定义widget内容
        Center(
          child: Container(
            width: ScreenHelper.screenWidth,
            // margin: const EdgeInsets.symmetric(horizontal: 4),
            padding: EdgeInsets.all(ScreenHelper.width(6)),

            child: ListView(
              children: controller.cellEdits.value,
              shrinkWrap: true,
            ),
          ),
        ),
        SizedBox(
          height: ScreenHelper.height(15),
        ),
        Container(
          margin: EdgeInsets.symmetric(horizontal: 10),
          child: Row(
            children: [
              Expanded(
                  child: roundBtn(
                      onTap: () {
                        Get.back();
                      },
                      text: "取消",
                      bgColor: Colors.white,
                      textColor: AppTheme.primyColor,
                      borderColor: AppTheme.primyColor)),
              SizedBox(
                width: ScreenHelper.width(10),
              ),
              Expanded(
                  child: roundBtn(
                      onTap: () {
                        Get.back();
                        controller.addPressureData();
                      },
                      text: "添加",
                      bgColor: AppTheme.primyColor,
                      textColor: Colors.white)),
            ],
          ),
        )
      ],
    );
  }
}
